package com.taozi.minidao.example.dao;

import java.util.List;
import java.util.Map;

import org.jeecgframework.minidao.annotation.Arguments;
import org.jeecgframework.minidao.annotation.MiniDao;
import org.jeecgframework.minidao.annotation.Param;
import org.jeecgframework.minidao.annotation.Sql;

import com.taozi.minidao.example.entity.User;


@MiniDao
public interface UserDao {

	@Arguments({"user"})
	List<Map<String, Object>> getAll(User user);
	
	@Sql(value = "select count(id) from user")
	int getCount();
	
	@Arguments({"user"})
	int insert(User user);
	
	@Arguments({"user"})
	int update(User user);
	
	@Sql(value = "delete from user where id = :id")
	int delete(@Param("id") String id);
	
}
